home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: uu4news.netcom.com!zodiac!szh
- From: szh@zcon.com (Syed Zaeem Hosain)
- Subject: Re: What is wrong in this code?
- Message-ID: <1996Jan13.000841.20965@zcon.com>
- Sender: szh@zcon.com (Syed Zaeem Hosain)
- Nntp-Posting-Host: zodiac
- Reply-To: szh@zcon.com
- Organization: Z Consulting Group
- References: <DL2z7o.2K5@scisun.sci.ccny.cuny.edu>
- Date: Sat, 13 Jan 1996 00:08:41 GMT
-
- In article <DL2z7o.2K5@scisun.sci.ccny.cuny.edu>, sergio@sci.ccny.cuny.edu (Sergio Rojas) writes:
- > I am traying to be literate in C and here is a
- >problem wich I have been unable to detect:
- >
- >#include <stdio.h>
- >#include <math.h>
- >main()
- >{
- >double x;
- >
- >printf("\n Enter a number \n");
- >
- >scanf("%f", &x);
- >
- >printf("\n %e to the power %e is equal to ", x , x );
- >
- >x = pow(x,x);
- >
- >printf(" %12.6f \n", x );
- >
- >}
-
-
- Your question is clearly answered in the FAQ for this newsgroup. Please
- get it from rtfm.mit.edu:/pub/usenet/... and look at the question 12.13
- and its answer. For reference, here is the question:
-
- 12.13: Why doesn't this code:
-
- double d;
- scanf("%f", &d);
-
- work?
-
- A: [deleted ... to make you go get the FAQ and read it]
-
-
- Z
-
-
- --
- -------------------------------------------------------------------------
- | Syed Zaeem Hosain P. O. Box 610097 (408) 441-7021 |
- | Z Consulting Group San Jose, CA 95161 szh@zcon.com |
- -------------------------------------------------------------------------
-